﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace Admin2025.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class SeedRbacDataV2 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "AppRolePermission",
                keyColumn: "Id",
                keyValue: new Guid("91970afe-9d19-4fe0-bb37-2de5880f1442"));

            migrationBuilder.DeleteData(
                table: "AppRolePermission",
                keyColumn: "Id",
                keyValue: new Guid("cc1e520e-4511-401c-8b66-89e2907b6b6c"));

            migrationBuilder.DeleteData(
                table: "AppUserRole",
                keyColumn: "Id",
                keyValue: new Guid("d6df376a-a276-4f98-9150-5afdef698598"));

            migrationBuilder.InsertData(
                table: "AppRolePermission",
                columns: new[] { "Id", "CreatedAt", "CreatedBy", "DisplayOrder", "IsActived", "IsDeleted", "PermissionId", "Remarks", "RoleId", "UpdatedAt", "UpdatedBy" },
                values: new object[,]
                {
                    { new Guid("66666666-6666-6666-6666-666666666666"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000"), 0, true, false, new Guid("33333333-3333-3333-3333-333333333333"), "", new Guid("22222222-2222-2222-2222-222222222222"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000") },
                    { new Guid("77777777-7777-7777-7777-777777777777"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000"), 0, true, false, new Guid("44444444-4444-4444-4444-444444444444"), "", new Guid("22222222-2222-2222-2222-222222222222"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000") }
                });

            migrationBuilder.InsertData(
                table: "AppUserRole",
                columns: new[] { "Id", "CreatedAt", "CreatedBy", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "RoleId", "UpdatedAt", "UpdatedBy", "UserId" },
                values: new object[] { new Guid("55555555-5555-5555-5555-555555555555"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000"), 0, true, false, "", new Guid("22222222-2222-2222-2222-222222222222"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000"), new Guid("11111111-1111-1111-1111-111111111111") });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "AppRolePermission",
                keyColumn: "Id",
                keyValue: new Guid("66666666-6666-6666-6666-666666666666"));

            migrationBuilder.DeleteData(
                table: "AppRolePermission",
                keyColumn: "Id",
                keyValue: new Guid("77777777-7777-7777-7777-777777777777"));

            migrationBuilder.DeleteData(
                table: "AppUserRole",
                keyColumn: "Id",
                keyValue: new Guid("55555555-5555-5555-5555-555555555555"));

            migrationBuilder.InsertData(
                table: "AppRolePermission",
                columns: new[] { "Id", "CreatedAt", "CreatedBy", "DisplayOrder", "IsActived", "IsDeleted", "PermissionId", "Remarks", "RoleId", "UpdatedAt", "UpdatedBy" },
                values: new object[,]
                {
                    { new Guid("91970afe-9d19-4fe0-bb37-2de5880f1442"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000"), 0, true, false, new Guid("33333333-3333-3333-3333-333333333333"), "", new Guid("22222222-2222-2222-2222-222222222222"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000") },
                    { new Guid("cc1e520e-4511-401c-8b66-89e2907b6b6c"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000"), 0, true, false, new Guid("44444444-4444-4444-4444-444444444444"), "", new Guid("22222222-2222-2222-2222-222222222222"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000") }
                });

            migrationBuilder.InsertData(
                table: "AppUserRole",
                columns: new[] { "Id", "CreatedAt", "CreatedBy", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "RoleId", "UpdatedAt", "UpdatedBy", "UserId" },
                values: new object[] { new Guid("d6df376a-a276-4f98-9150-5afdef698598"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000"), 0, true, false, "", new Guid("22222222-2222-2222-2222-222222222222"), new DateTime(2025, 7, 2, 0, 0, 0, 0, DateTimeKind.Utc), new Guid("00000000-0000-0000-0000-000000000000"), new Guid("11111111-1111-1111-1111-111111111111") });
        }
    }
}
